package com.team.controller;

import com.team.contant.DataDictionaryContant;
import com.team.pojo.DataDictionary;
import com.team.service.DataDictionaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/")
public class DataDictionaryController {
 @Autowired(required = false)
 private DataDictionaryService dataDictionaryService;
 @RequestMapping("getAppState")
 @ResponseBody
 public List<DataDictionary> getAppState(){
  return dataDictionaryService.getDataDictionaryByName(DataDictionaryContant.APP_STATUS);
 }

 @RequestMapping("getFlatform")
 @ResponseBody
 public List<DataDictionary> getFlatform(){
  return dataDictionaryService.getDataDictionaryByName(DataDictionaryContant.APP_FLATFORM);
 }
}
